<!--[pnajaxheader modname="crpVideo" nobehaviour=true effects=true]-->
<!--[pnpageaddvar name="javascript" value="modules/crpVideo/pnjavascript/carousel.js"]-->
<!--[pnpageaddvar name="stylesheet" value="modules/crpVideo/pnstyle/style.css"]-->
<!--[pnpageaddvar name="stylesheet" value="modules/crpVideo/pnstyle/carousel.css"]-->

<!--[if count($videos)]-->

<div id="<!--[$direction]-->_carousel">
  <div class="previous_button"></div>
  <div class="container">
    <ul>

		<!--[foreach from=$videos item=video]-->			
		<!--[if $crpvideo_use_gd eq '1']-->
		<!--[pnmodurl modname="crpVideo" type="user" func="get_thumbnail" videoid=$video.videoid width="144" assign=thumburl]-->
		<!--[else]-->
		<!--[pnmodurl modname="crpVideo" type="user" func="get_image" videoid=$video.videoid assign=thumburl]-->
		<!--[/if]-->
		
		<!--[pnmodurl modname=crpVideo func=display videoid=$video.videoid cat=$video.__CATEGORIES__.Main.id assign=imgurl]-->
		<li>
			<a href="<!--[$imgurl|pnvarprepfordisplay]-->"><img src="<!--[$thumburl|pnvarprepfordisplay]-->" alt="<!--[$video.title|pnvarprepfordisplay]-->" title="<!--[$video.title|pnvarprepfordisplay]-->" /></a>
		</li>
		<!--[/foreach]-->

    </ul>
  </div>
  <div class="next_button"></div>
</div>

<script type="text/javascript">
//<!--
new UI.Carousel("<!--[$direction]-->_carousel", {direction: "<!--[$direction]-->"});
//-->
</script>

<div style="clear:left;">&nbsp;</div>
<!--[/if]-->
